<?php
header("Content-type: text/html; charset=utf-8");
$conn = @mysql_connect('localhost','root','')//
or die('数据库无法连接'); 
@mysql_select_db('new_video',$conn)  //$conn 是选择连接的数据库   不写默认上一个
or die('数据库不存在aaaa');
mysql_set_charset('utf8');//以下的数据库都以UTF8编码
$typename=$_POST['typename'];
$sql="insert into videotype(typename) values('$typename')";
echo $sql;
exit();
$result1= mysql_query($sql);
$videos=fetch_array($result1);


function fetch_array($Results){
	$arrs = array();
	while ($Results && ($row=mysql_fetch_array($Results))!==FALSE) {   
		$arrs[]=$row;
	}
	return $arrs;
}


 ?>